<label>{lang join.module.view.timespan}</label>
<input type="text" class="input-medium input-time" name="txtBeginTime" maxlength="16" value="{$module_data[begintime]}"/> {lang join.module.view.timespan.to} 
<input type="text" class="input-medium input-time" name="txtEndTime" maxlength="16" value="{$module_data[endtime]}"/>
<br/><br/>

<script>
$(function(){
	$('#modal_dialog .btn-primary').unbind('click').click(function(){
		var begintime = $("#modal_dialog input[name='txtBeginTime']").val();
		var endtime = $("#modal_dialog input[name='txtEndTime']").val();
		
		var tips = '{lang join.module.view.tips}';
		if(begintime || endtime){
			if(begintime) tips += begintime + '{lang join.module.view.timespan.begin}';
			if(begintime && endtime) tips += ' {lang join.module.view.timespan.to} ';
			if(endtime) tips += endtime + '{lang join.module.view.timespan.end}';
		}else{
			tips += '{lang join.module.view.tips.open}';
		}
		
		hdnModule.value = 'join|' + begintime + '|' + endtime + '|' + tips;
		
		$('.module .tips').html(tips);
		$('#modal_dialog').modal('hide').remove();
	});
});
</script>